//
//  WorkOrder.h
//
//  Created by Olof Millberg on 2010-03-22.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "WOAddress.h"

@interface WorkOrder : NSObject
{
	//Specific for a work order.
	NSInteger workID;
	NSString *description;
	NSString *checklistType;
	NSString *status;
	NSString *priority;
	NSString *customer;
	NSDate *entryDate;
	NSDate *endDate;
	WOAddress *address;	
	NSMutableArray *employees;
	NSMutableArray *contactPersons;
	NSMutableArray *workLeaders;
	NSMutableArray *attachedFiles;
	NSMutableArray *historyEntries;
	NSMutableArray *addedHistoryEntries;
	NSMutableArray *updatedHistoryEntries;
	NSMutableArray *timeReports;
	NSMutableArray *addedTimeReports;
	NSMutableArray *updatedTimeReports;
	NSMutableArray *checklistPoints;
	NSMutableArray *timeTypes;
	NSMutableArray *statusTypes;
	NSMutableArray *priorityTypes;
}

@property (nonatomic,assign) NSInteger workID;
@property (nonatomic,retain) NSString *description;
@property (nonatomic,retain) NSString *checklistType;
@property (nonatomic,retain) NSString *status;
@property (nonatomic,retain) NSString *priority;
@property (nonatomic,retain) NSString *customer;	
@property (nonatomic,retain) NSDate *entryDate;
@property (nonatomic,retain) NSDate *endDate;
@property (nonatomic,retain) WOAddress *address;
@property (nonatomic,retain) NSMutableArray *employees;
@property (nonatomic,retain) NSMutableArray *contactPersons;
@property (nonatomic,retain) NSMutableArray *workLeaders;
@property (nonatomic,retain) NSMutableArray *attachedFiles;
@property (nonatomic,retain) NSMutableArray *historyEntries;
@property (nonatomic,retain) NSMutableArray *addedHistoryEntries;
@property (nonatomic,retain) NSMutableArray *updatedHistoryEntries;
@property (nonatomic,retain) NSMutableArray *timeReports;
@property (nonatomic,retain) NSMutableArray *addedTimeReports;
@property (nonatomic,retain) NSMutableArray *updatedTimeReports;
@property (nonatomic,retain) NSMutableArray *checklistPoints;
@property (nonatomic,retain) NSMutableArray *timeTypes;
@property (nonatomic,retain) NSMutableArray *statusTypes;
@property (nonatomic,retain) NSMutableArray *priorityTypes;

-(id)initWithWorkID:(NSInteger) aWorkID 
		description:(NSString *) aDescription 
	  checklistType:(NSString *) aCheckListType
			 status:(NSString *) aStatus 
		   priority:(NSString *) aPriority 
		   customer:(NSString *) aCustomer
		  entryDate:(NSDate *) anEntryDate 
			endDate:(NSDate *) anEndDate
			address:(WOAddress *) anAddress 
		  employees:(NSMutableArray *) someEmployees 
	 contactPersons:(NSMutableArray *) someContactPersons
		workLeaders:(NSMutableArray *) someWorkLeaders
	  attachedFiles:(NSMutableArray *) someAttachedFiles
	 historyEntries:(NSMutableArray *) someHistoryEntries
		timeReports:(NSMutableArray *) someTimeReports
	checklistPoints:(NSMutableArray *) someChecklistPoints
		  timeTypes:(NSMutableArray *) theTimeTypes
		statusTypes:(NSMutableArray *) theStatusTypes
	  priorityTypes:(NSMutableArray *) thePriorityTypes;

@end